/**
 * Created by 84995 on 2020/1/16.
 */
public class test14 {

    public static void main(String[] args) {

        String s="this is a test of java";

        char[] chars = s.toCharArray();
        int charNum = getCharNum(chars);
        System.out.println("s出现了："+charNum);

        String[] split = s.split(" ");
        System.out.println(split[3]);

        System.out.println(s.replace("java","JAVASE"));


    }
    public static int getCharNum(char[]  c){

        int counbt=0;
        for (char c1 : c) {
            if (c1=='s'){
                counbt++;
            }
        }


   return counbt; }
}
